/**
 * Package domain
 */
package teamrocket.domain; // $codepro.audit.disable packagePrefixNamingConvention

import java.util.logging.Level;

import teamrocket.logging.TLogger;

/**
 * Represents a nurse in the database
 * 
 * @author Stephen
 * 
 * @version $Revision: 1.0 $
 */
public class Nurse extends User {

	/**
	 * Field serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Field accessLevel.
	 */
	private String accessLevel;

	/**
	 * Field appointments.
	 */
	private Appointment[] appointments;

	/**
	 * Field nurseDefPerms. (value is "User.LOGIN + User.MODDRORDERS +
	 * User.MODPATIENTS + User.MODTR + User.VIEWAPPTS")
	 */
	private static final String NURSEDEFPERMS = User.LOGIN + User.MODDRORDERS
			+ User.MODPATIENTS + User.MODTR + User.VIEWAPPTS;

	/**
	 * Constructs a nurse object in memory
	 * 
	 * @param username
	 * @param password
	 * @param firstName
	 * @param lastName
	 */
	public Nurse(String username, String password, String firstName,
			String lastName) {
		super(username, password, firstName, lastName, "n", NURSEDEFPERMS);
		TLogger.getInstance().getLogger().log(Level.INFO,
				"Creating new Nurse " + username);
	}

	/**
	 * Method getAccessLevel.
	 * 
	 * @return String
	 */
	public String getAccessLevel() {
		return accessLevel;
	}

	/**
	 * Method setAccessLevel.
	 * 
	 * @param accessLevel
	 *            String
	 */
	public void setAccessLevel(String accessLevel) {
		this.accessLevel = accessLevel;
	}

	/**
	 * Method getAppointments.
	 * 
	 * @return Appointment[]
	 */
	public Appointment[] getAppointments() {
		return appointments;
	}

	/**
	 * Method setAppointments.
	 * 
	 * @param appointments
	 *            Appointment[]
	 */
	public void setAppointments(Appointment[] appointments) {
		this.appointments = appointments; // $codepro.audit.disable com.instantiations.assist.eclipse.arrayIsStoredWithoutCopying
	}
}
